//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.until;

import org.come.bean.PrivateData;
import org.come.entity.RoleSummoning;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;

/**
 * @author 黄建彬
 * 当召唤兽的信息和人物角色的信息改变了，发送信息给服务器
 * 发送当前物品给服务器
 */

public class SendRoleAndRolesummingUntil {
	public SendRoleAndRolesummingUntil() {
	}
	/**将改变的召唤兽信息发送给服务器*/
	public static void sendRoleSumming(RoleSummoning roleSummoning) {
		if (roleSummoning != null) {
			String serverMes = Agreement.getAgreement().petchangeAgreement(GsonUtil.getGsonUtil().getgson().toJson(roleSummoning));
			SendMessageUntil.toServer(serverMes);
		}
		// 宠物跟随 观看独立数据，解决召唤兽加点，吃内丹，加血加法，人物自动停止任务
		else {

			String serverMes = Agreement.getAgreement().petchangegAgreement(GsonUtil.getGsonUtil().getgson().toJson(roleSummoning));
			SendMessageUntil.toServer(serverMes);

		}
		// 宠物跟随 观看独立数据，解决召唤兽加点，吃内丹，加血加法，人物自动停止任务
	}
	/**修改玩家私密数据*/
	public static void sendRole(PrivateData data) {
		if (data != null) {
			String serverMes = Agreement.getAgreement().rolePrivateAgreement(GsonUtil.getGsonUtil().getgson().toJson(data));
			SendMessageUntil.toServer(serverMes);
		}

	}
}
